package com.guigu.www.erp.luolujin.service.Impl;

import com.guigu.www.erp.dehao.dao.MenuMapper;
import com.guigu.www.erp.dehao.dao.RoleMenuMapper;
import com.guigu.www.erp.dehao.pojo.Menu;
import com.guigu.www.erp.dehao.pojo.RoleMenu;
import com.guigu.www.erp.luolujin.service.LljMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LljMenuSerivceImpl implements LljMenuService {
    @Autowired
    private MenuMapper menuMapper;
    @Autowired
    private RoleMenuMapper mapper;
    @Override
    public List<Menu> findMenu() {
        return menuMapper.findMenu();
    }

    @Override
    public List<RoleMenu> findByRoleId(int roleId) {
        return mapper.findByRoleId(roleId);
    }

    @Override
    public void deleteByMenuId(Integer roleId) {
        mapper.deleteByMenuId(roleId);
    }
    @Override
    public void insertSelective(RoleMenu record) {
        mapper.insertSelective(record);
    }
}
